home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / powerup / ppcpragmas / timer_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  3KB  |  122 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_TIMER_H
  4. #define _PPCPRAGMA_TIMER_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__TIMER_H
  7. #include <powerup/ppcinline/timer.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef TIMER_BASE_NAME
  24. #define TIMER_BASE_NAME TimerBase
  25. #endif /* !TIMER_BASE_NAME */
  26.  
  27. #define    AddTime(dest, src)    _AddTime(TIMER_BASE_NAME, dest, src)
  28.  
  29. static __inline void
  30. _AddTime(void *TimerBase, struct timeval *dest, struct timeval *src)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.a0        =(ULONG) dest;
  40.     MyCaos.a1        =(ULONG) src;
  41.     MyCaos.caos_Un.Offset    =    (-42);
  42.     MyCaos.a6        =(ULONG) TimerBase;    
  43.     PPCCallOS(&MyCaos);
  44. }
  45.  
  46. #define    CmpTime(dest, src)    _CmpTime(TIMER_BASE_NAME, dest, src)
  47.  
  48. static __inline LONG
  49. _CmpTime(void *TimerBase, struct timeval *dest, struct timeval *src)
  50. {
  51. struct Caos    MyCaos;
  52.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  53. //    MyCaos.M68kStart    =    NULL;
  54. //    MyCaos.M68kSize        =    0;
  55.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  56. //    MyCaos.PPCStart        =    NULL;
  57. //    MyCaos.PPCSize        =    0;
  58.     MyCaos.a0        =(ULONG) dest;
  59.     MyCaos.a1        =(ULONG) src;
  60.     MyCaos.caos_Un.Offset    =    (-54);
  61.     MyCaos.a6        =(ULONG) TimerBase;    
  62.     return((LONG)PPCCallOS(&MyCaos));
  63. }
  64.  
  65. #define    GetSysTime(dest)    _GetSysTime(TIMER_BASE_NAME, dest)
  66.  
  67. static __inline void
  68. _GetSysTime(void *TimerBase, struct timeval *dest)
  69. {
  70. struct Caos    MyCaos;
  71.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  72. //    MyCaos.M68kStart    =    NULL;
  73. //    MyCaos.M68kSize        =    0;
  74.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  75. //    MyCaos.PPCStart        =    NULL;
  76. //    MyCaos.PPCSize        =    0;
  77.     MyCaos.a0        =(ULONG) dest;
  78.     MyCaos.caos_Un.Offset    =    (-66);
  79.     MyCaos.a6        =(ULONG) TimerBase;    
  80.     PPCCallOS(&MyCaos);
  81. }
  82.  
  83. #define    ReadEClock(dest)    _ReadEClock(TIMER_BASE_NAME, dest)
  84.  
  85. static __inline ULONG
  86. _ReadEClock(void *TimerBase, struct EClockVal *dest)
  87. {
  88. struct Caos    MyCaos;
  89.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  90. //    MyCaos.M68kStart    =    NULL;
  91. //    MyCaos.M68kSize        =    0;
  92.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  93. //    MyCaos.PPCStart        =    NULL;
  94. //    MyCaos.PPCSize        =    0;
  95.     MyCaos.a0        =(ULONG) dest;
  96.     MyCaos.caos_Un.Offset    =    (-60);
  97.     MyCaos.a6        =(ULONG) TimerBase;    
  98.     return((ULONG)PPCCallOS(&MyCaos));
  99. }
  100.  
  101. #define    SubTime(dest, src)    _SubTime(TIMER_BASE_NAME, dest, src)
  102.  
  103. static __inline void
  104. _SubTime(void *TimerBase, struct timeval *dest, struct timeval *src)
  105. {
  106. struct Caos    MyCaos;
  107.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  108. //    MyCaos.M68kStart    =    NULL;
  109. //    MyCaos.M68kSize        =    0;
  110.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  111. //    MyCaos.PPCStart        =    NULL;
  112. //    MyCaos.PPCSize        =    0;
  113.     MyCaos.a0        =(ULONG) dest;
  114.     MyCaos.a1        =(ULONG) src;
  115.     MyCaos.caos_Un.Offset    =    (-48);
  116.     MyCaos.a6        =(ULONG) TimerBase;    
  117.     PPCCallOS(&MyCaos);
  118. }
  119.  
  120. #endif /* SASC Pragmas */
  121. #endif /* !_PPCPRAGMA_TIMER_H */
  122.